<?php if (!defined('THINK_PATH')) exit(); /*a:4:{s:76:"D:\zrhost\ynspsc\code\back\public/../application/admin/view/index/index.html";i:1500081817;s:82:"D:\zrhost\ynspsc\code\back\public/../application/admin/view/public/headerbase.html";i:1500460707;s:76:"D:\zrhost\ynspsc\code\back\public/../application/admin/view/public/left.html";i:1500081818;s:78:"D:\zrhost\ynspsc\code\back\public/../application/admin/view/public/footer.html";i:1500081818;}*/ ?>
<!DOCTYPE html>
<html lang="zh-cn">

	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<title>公众平台自助引擎-中微信通</title>
		<meta name="keywords" content="" />
		<meta name="description" content="一款免费开源的微信公众平台管理系统，是国内最完善移动网站及移动互联网技术解决方案。" />
		<link rel="shortcut icon" href="__PUBLIC__/favicon.ico" />
		<link href="__PUBLIC__/css/bootstrap.min.css" rel="stylesheet">
		<link href="__PUBLIC__/css/common.css" rel="stylesheet">
		<script type="text/javascript" src="__PUBLIC__/js/jquery-1.11.1.min.js"></script>
		<script type="text/javascript" src="__PUBLIC__/js/bootstrap.min.js"></script>
		<script type="text/javascript" src="__PUBLIC__/js/util.js"></script>
		<script type="text/javascript" src="__PUBLIC__/js/require.js"></script>
		<link rel="stylesheet" href="__PUBLIC__/zrUploads/control/css/zyUpload.css" type="text/css" />
   
    <!-- 引用核心层插件 -->
    <script type="text/javascript" src="__PUBLIC__/zrUploads/core/zyFile.js"></script>

    <!-- 引用控制层插件 -->
    <script type="text/javascript" src="__PUBLIC__/zrUploads/control/js/zyUpload.js"></script>
    <!-- 引用初始化JS -->
    <script type="text/javascript" src="__PUBLIC__/zrUploads/demo.js"></script>
    <script type="text/javascript" charset="utf-8" src="__PUBLIC__/ueditor/ueditor.config.js"></script>
    <script type="text/javascript" charset="utf-8" src="__PUBLIC__/ueditor/ueditor.all.min.js"> </script>
    <!--建议手动加在语言，避免在ie下有时因为加载语言失败导致编辑器加载失败-->
    <!--这里加载的语言文件会覆盖你在配置项目里添加的语言类型，比如你在配置项目里配置的是英文，这里加载的中文，那最后就是中文-->
    <script type="text/javascript" charset="utf-8" src="__PUBLIC__/ueditor/lang/zh-cn/zh-cn.js"></script>
		<style>
			.act{
				background-color: #428BCA;
			}
		</style>
	</head>

	<body data-skin="default" class=" ">
		<div class="loader" style="display:none">
			<div class="la-ball-clip-rotate">
				<div></div>
			</div>
		</div>
		<div class="head">
			<nav class="navbar navbar-default" role="navigation">
				<div class="container ">
					<div class="navbar-header">
						<a class="navbar-brand" href="http://localhost/upload/">
							<img src="__PUBLIC__/images/logo.png" class="pull-left" width="110px" height="35px">
							<span class="version">1.0.0</span>
						</a>
					</div>
					<div class="collapse navbar-collapse">
						<ul class="nav navbar-nav navbar-left">
							<li class="active">
								<a href="<?php echo url('Index/index'); ?>">系统管理</a>
							</li>
						</ul>
						<ul class="nav navbar-nav navbar-right">
							<li class="dropdown">
								<a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown"><i class="wi wi-user color-gray"></i><?php echo session('username'); ?><span class="caret"></span></a>
								<ul class="dropdown-menu color-gray" role="menu">
									<li>
										<a href="<?php echo url('Index/index'); ?>" target="_blank"><i class="wi wi-account color-gray"></i> 我的账号</a>
									</li>
									<li class="divider"></li>
									<li>
										<a href="<?php echo url('Login/loginout'); ?>"><i class="fa fa-sign-out color-gray"></i> 退出系统</a>
									</li>
								</ul>
							</li>
						</ul>
					</div>
				</div>
			</nav>
		</div>
		<div class="main">
			<div class="container">
				<div class="panel panel-content main-panel-content ">
					<div class="content-head panel-heading main-panel-heading">
						<span class="font-lg"><i class="wi wi-setting"></i> 系统管理</span>
					</div>
					<div class="panel-body clearfix main-panel-body "> <div class="left-menu">
	<div class="left-menu-content">
		<div class="left-menu-top skin-black">

			<div class="font-lg title-setting"><i class="wi wi-setting"></i> 系统管理</div>
		</div>
		<div class="panel panel-menu">
			<div class="panel-heading">
				<span class="no-collapse">帐户/用户<i class="wi wi-appsetting pull-right setting"></i></span>
				<span class="" data-toggle="collapse" data-target="#frame-user" onclick="util.cookie.set('menu_fold_tag:user', util.cookie.get('menu_fold_tag:user') == 1 ? 0 : 1)">帐户/用户<i class="wi wi-down-sign-s pull-right"></i></span>
			</div>

			<ul class="list-group collapse in" id="frame-user">
				<li class="list-group-item <?php if($a == 'Index'): ?>act<?php endif; ?>">
					<a href="<?php echo url('Index/index'); ?>" class="text-over">
						<i class="wi wi-account"></i> 我的帐户 </a>
				</li>
			</ul>
		</div>
		<div class="panel panel-menu">
			<div class="panel-heading">
				<span class="no-collapse">菜单列表<i class="wi wi-appsetting pull-right setting"></i></span>
			</div>

			<ul class="list-group collapse in" id="frame-wxplatform">
				<li class="list-group-item <?php if($a == 'Banner'): ?>act<?php endif; ?>">
					<a href="<?php echo url('Banner/index'); ?>" class="text-over">
						<i class="fa fa-photo"></i> 首页轮播图 </a>
				</li>
				<li class="list-group-item <?php if($a == 'Cate'): ?>act<?php endif; ?>">
					<a href="<?php echo url('Cate/index'); ?>" class="text-over">
						<i class="wi wi-notice"></i> 商品分类 </a>
				</li>
				<!-- <li class="list-group-item <?php if($a == 'Coupon'): ?>act<?php endif; ?>">
					<a href="<?php echo url('Coupon/index'); ?>" class="text-over">
						<i class="wi wi-message"></i> 优惠券管理 </a>
				</li> -->
				<li class="list-group-item <?php if($a == 'Brand'): ?>act<?php endif; ?>">
					<a href="<?php echo url('Brand/index'); ?>" class="text-over">
						<i class="wi wi-notice"></i> 品牌管理 </a>
				</li>
				<li class="list-group-item <?php if($a == 'Goods'): ?>act<?php endif; ?>">
					<a href="<?php echo url('Goods/index'); ?>" class="text-over">
						<i class="wi wi-template"></i> 商品管理 </a>
				</li>
				<li class="list-group-item <?php if($a == 'Orders'): ?>act<?php endif; ?>">
					<a href="<?php echo url('Orders/index'); ?>" class="text-over">
						<i class="wi wi-registersite"></i> 订单管理 </a>
				</li>
				<li class="list-group-item <?php if($a == 'User'): ?>act<?php endif; ?>">
					<a href="<?php echo url('User/index'); ?>" class="text-over">
						<i class="wi wi-template"></i> 用户管理 </a>
				</li>
			</ul>
		</div>
	</div>
</div>

<div class="right-content">
	<ol class="breadcrumb we7-breadcrumb">
		<div class="we7-page-title">我的账户</div>
	</ol>
	<div id="js-user-profile" ng-controller="UserProfileDisplay" ng-cloak>
		<div class="tab-content">
			<div role="tabpanel" class="tab-pane active" id="base">
				<table class="table we7-table table-hover table-form">
					<col width="140px " />
					<col />
					<col width="100px" />
					<tr>
						<th class="text-left" colspan="3">账户设置设置</th>
					</tr>
					<tr>
						<td class="table-label">用户名</td>
						<td ng-bind="user.username"><?php echo session('username'); ?></td>
						<td>
							<div class="link-group">
								<a href="#name" data-toggle="modal" data-target="" ng-click="editInfo('username', user.username)">修改</a>
							</div>
						</td>
					</tr>
					<tr>
						<td class="table-label">密码</td>
						<td>******</td>
						<td>
							<div class="link-group">
								<a href="javascript:;" data-toggle="modal" data-target="#pass">修改</a>
							</div>
						</td>
					</tr>
				</table>
				<div class="modal fade" id="name" role="dialog">
					<div class="we7-modal-dialog modal-dialog">
						<div class="modal-content">
							<div class="modal-header">
								<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
								<div class="modal-title">修改用户名</div>
							</div>
							<div class="modal-body">
								<div class="form-group">
									<input type="text" ng-model="userOriginal.username" class="form-control" placeholder="用户名" value="<?php echo session('username'); ?>" id="adminuser"/>
									<span class="help-block"></span>
								</div>
							</div>
							<div class="modal-footer">
								<button type="button" class="btn btn-primary" onclick="queding()">确定</button>
								<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
							</div>
						</div>
					</div>
				</div>
				<div class="modal fade" id="pass" role="dialog">
					<div class="we7-modal-dialog modal-dialog">
						<div class="modal-content">
							<div class="modal-header">
								<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
								<div class="modal-title">修改密码</div>
							</div>
							<div class="modal-body text-center">
								<div class="we7-form" style="width: 450px; margin: 0 auto;">
									<div class="form-group">
										<label for="" class="control-label col-sm-2">原密码</label>
										<div class="form-controls col-sm-10">
											<input type="password" value="" required="required" class="form-control old-password" id="ypawd" onBlur="ymima()">

										</div>
									</div>
									<div class="form-group">
										<label for="" class="control-label col-sm-2">新密码</label>
										<div class="form-controls col-sm-10">
											<input type="password" value="" required="required" class="form-control new-password" id="xpawd">

										</div>
									</div>
									<div class="form-group">
										<label for="" class="control-label col-sm-2">确认新密码</label>
										<div class="form-controls col-sm-10">
											<input type="password" value="" required="required" class="form-control renew-password" id="cpawd" onBlur="xmima()">
										</div>
									</div>
								</div>
							</div>
							<div class="modal-footer">
								<button type="button" class="btn btn-primary" onclick="savePwd()"  id="btn" >确定</button>
								<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
<script type="text/javascript">
	//修改用户名
	function queding(){
		var adminuser = $('#adminuser').val();
		if(adminuser=='')
		{
			util.message('用户名不能为空','','error');
		}
		$.ajax({
	        url: "<?php echo url('Index/updatename'); ?>",
	        data:{'adminuser':adminuser},
	        type: "post",
	        dataType: "json",
	        success: function (emg) {
	        	// alert(emg);
	           if(emg==1){
			  // alert("用户名修改成功");
	           		util.message('用户名修改成功', 'index/index', 'info');
					
	           }else if(emg==2){
	           		util.message('修改失败', '', '');
	           }
	        }
    	});
	}
	/**function ymima(){
		var ypawd = $('#ypawd').val();
		$.ajax({
	        url: "<?php echo url('Index/selectpawd'); ?>",
	        data:{'ypawd':ypawd},
	        type: "post",
	        dataType: "json",
	        success: function (emgs) {
	          if(emgs!=1){
	          	util.message('密码输入错误', '', '');
				
	          }
	        }
    	});
	}
	function xmima(){
		var xpawd = $('#xpawd').val();
		var cpawd = $('#cpawd').val();
		if(xpawd!=cpawd){
			util.message('两次输入密码不一致', '', '');
		}else{
			$("#btn").removeAttr("disabled");
		}
	}
	//修改密码
	function pawd(){
		var cpawd = $('#cpawd').val();
		var ypawd = $('#ypawd').val();
		var xpawd = $('#xpawd').val();
		if(ypawd!=='' && cpawd!=='' && xpawd!=='')
		{
			$.ajax({
					url: "<?php echo url('Index/updatepawd'); ?>",
					data:{'cpawd':cpawd},
					type: "post",
					dataType: "json",
					success: function (data) {
					  if(data==1){
							util.message('密码修改成功', "<?php echo url('Index/index'); ?>", '');
					   }else{
							util.message('修改失败', '', '');
					   }
					}
				});
			
		}else{
			util.message('请填写完整信息', '', '');
			return false;
		}
	}**/
	function savePwd(){
		var cpawd = $('#cpawd').val();
		var ypawd = $('#ypawd').val();
		var xpawd = $('#xpawd').val();
		if(ypawd=='' || ypawd=='' || xpawd=='')
		{
			util.message('请填写相关信息', '', '');
				return false;
		}else{
		$.ajax({
	        url: "<?php echo url('Index/selectpawd'); ?>",
	        data:{'ypawd':ypawd},
	        type: "post",
	        dataType: "json",
	        success: function (emgs) {
				
	          if(emgs!=1){
					util.message('原密码不正确', '', '');
	          }else{
				if(xpawd!=cpawd){
					util.message('两次输入密码不一致', '', '');
					return false;
				}else{
					
					if(ypawd!=='' && cpawd!=='' && xpawd!==''  )
						{
							if(ypawd!=cpawd)
							{
								
								$.ajax({
									url: "<?php echo url('Index/updatepawd'); ?>",
									data:{'cpawd':cpawd},
									type: "post",
									dataType: "json",
									success: function (data) {
									  if(data==1){
											//alert("修改成功");
											util.message('密码修改成功', "<?php echo url('Index/index'); ?>", 'info');
									   }else{
											util.message('修改失败', '', '');
											return false;
									   }
									}
								});
							}else{
								util.message('新密码与原密码相同', '', '');
							}
							
							
						}else{
							util.message('未填写完整信息', '', '');
							return false;
						}
				}
			  }
	        }
    	});
		}
	}
</script>

				</div>
			</div>
		</div>
	</div>
	<div class="container-fluid footer text-center" role="footer">
		<div class="friend-link" style="color:#000">
			<a href="http://www.zhongweixintong.com">QQ:553101513&nbsp;&nbsp;联系电话:010-64125951/64125035</a>
		</div>
		<div style="color:#000">
			<a href="http://www.zhongweixintong.com"><b>中微信通</b></a> v1.0.0 &copy; 2014-2017
			<a href="http://www.zhongweixintong.com">www.zhongweixintong.com</a>
		</div>
	</div>
</body>
</html>
